package com.gitee.slowcreator.http.file.download;

/**
 * 文件下载
 *
 * @author zxw
 * @date 2023/6/10 11:32
 */
public interface IFileDownload<Request, Response> {

    /**
     * 下载内容转为byte[]
     *
     * @param response
     * @param request
     * @return
     */
    default DownloadResult downloadByte(Request request, Response response) {
        throw new UnsupportedOperationException("不支持的操作！");
    }

    /**
     * 下载文件
     *
     * @param response
     * @param request
     * @return
     */
    default DownloadResult downloadFile(Request request, Response response) {
        throw new UnsupportedOperationException("不支持的操作！");
    }
}
